package se.webbzon.boltzmann.minigame.menu;

public class MenuEvent {
	
	// The source of this menu event
	private final Menu source;
	
	// The old and new menu index
	private int oldIndex, newIndex;
	
	/*============================================================
	Constructors
	============================================================*/
	
	public MenuEvent(Menu source, int oldIndex, int newIndex) {
		this.source = source;
		this.oldIndex = oldIndex;
		this.newIndex = newIndex;
	}

	/*============================================================
	Public Methods
	============================================================*/
	
	/** Sets the old index of this menu event. **/
	public void setOldIndex(int oldIndex) {
		this.oldIndex = oldIndex;
	}

	/** Sets the new index of this menu event. **/
	public void setNewIndex(int newIndex) {
		this.newIndex = newIndex;
	}

	/** Returns the source of this menu event. **/
	public Menu getSource() {
		return source;
	}

	/** Returns the old index of this menu event. **/
	public int getOldIndex() {
		return oldIndex;
	}

	/** Returns the new index of this menu event. **/
	public int getNewIndex() {
		return newIndex;
	}

}
